Optimal. Leaf size=49 \[ \frac {b \text {ArcTan}(\sinh (c+d x))}{2 d}-\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3747, 3855,
2691} \begin {gather*} -\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}+\frac {b \text {ArcTan}(\sinh (c+d x))}{2 d}-\frac {b \tanh (c+d x) \text {sech}(c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2691
Rule 3747
Rule 3855
Rubi steps
\begin {align*} \int \text {csch}(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx &=i \int \left (-i a \text {csch}(c+d x)-i b \text {sech}(c+d x) \tanh ^2(c+d x)\right ) \, dx\\ &=a \int \text {csch}(c+d x) \, dx+b \int \text {sech}(c+d x) \tanh ^2(c+d x) \, dx\\ &=-\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d}+\frac {1}{2} b \int \text {sech}(c+d x) \, dx\\ &=\frac {b \tan ^{-1}(\sinh (c+d x))}{2 d}-\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 75, normalized size = 1.53 \begin {gather*} \frac {b \text {ArcTan}(\sinh (c+d x))}{2 d}-\frac {a \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a \log \left (\sinh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 2.89, size = 101, normalized size = 2.06
method | result | size |
risch | \(-\frac {b \,{\mathrm e}^{d x +c} \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}+\frac {i b \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 d}-\frac {i b \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 d}+\frac {a \ln \left ({\mathrm e}^{d x +c}-1\right )}{d}-\frac {a \ln \left ({\mathrm e}^{d x +c}+1\right )}{d}\) | \(101\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 83, normalized size = 1.69 \begin {gather*} -b {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} + \frac {e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} + \frac {a \log \left (\tanh \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 522 vs.
\(2 (45) = 90\).
time = 0.37, size = 522, normalized size = 10.65 \begin {gather*} -\frac {b \cosh \left (d x + c\right )^{3} + 3 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{3} - {\left (b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, b \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) - b \cosh \left (d x + c\right ) + {\left (a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, a \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a \cosh \left (d x + c\right )^{2} + a\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a \cosh \left (d x + c\right )^{3} + a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) - {\left (a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, a \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a \cosh \left (d x + c\right )^{2} + a\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a \cosh \left (d x + c\right )^{3} + a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right ) + {\left (3 \, b \cosh \left (d x + c\right )^{2} - b\right )} \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 2 \, d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right ) \operatorname {csch}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 74, normalized size = 1.51 \begin {gather*} \frac {b \arctan \left (e^{\left (d x + c\right )}\right ) - a \log \left (e^{\left (d x + c\right )} + 1\right ) + a \log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right ) - \frac {b e^{\left (3 \, d x + 3 \, c\right )} - b e^{\left (d x + c\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.47, size = 233, normalized size = 4.76 \begin {gather*} \frac {2\,b\,{\mathrm {e}}^{c+d\,x}}{d+2\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}+d\,{\mathrm {e}}^{4\,c+4\,d\,x}}-\frac {a\,\ln \left (-8\,a\,b^2-32\,a^3-32\,a^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-8\,a\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{d}+\frac {a\,\ln \left (8\,a\,b^2+32\,a^3-32\,a^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-8\,a\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{d}-\frac {b\,\left (\ln \left (4\,b^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+16\,a^2\,b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-a^2\,b\,16{}\mathrm {i}-b^3\,4{}\mathrm {i}\right )\,1{}\mathrm {i}-\ln \left (4\,b^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+16\,a^2\,b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+a^2\,b\,16{}\mathrm {i}+b^3\,4{}\mathrm {i}\right )\,1{}\mathrm {i}\right )}{2\,d}-\frac {b\,{\mathrm {e}}^{c+d\,x}}{d+d\,{\mathrm {e}}^{2\,c+2\,d\,x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________